package com.ruoyi.system.navigationMark.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.navigationMark.mapper.NavigationMarkMapper;
import com.ruoyi.system.navigationMark.domain.NavigationMark;
import com.ruoyi.system.navigationMark.service.INavigationMarkService;

/**
 * 航标基础信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-21
 */
@Service
public class NavigationMarkServiceImpl implements INavigationMarkService 
{
    @Autowired
    private NavigationMarkMapper navigationMarkMapper;

    /**
     * 查询航标基础信息
     * 
     * @param id 航标基础信息主键
     * @return 航标基础信息
     */
    @Override
    public NavigationMark selectNavigationMarkById(Long id)
    {
        return navigationMarkMapper.selectNavigationMarkById(id);
    }

    /**
     * 查询航标基础信息列表
     * 
     * @param navigationMark 航标基础信息
     * @return 航标基础信息
     */
    @Override
    public List<NavigationMark> selectNavigationMarkList(NavigationMark navigationMark)
    {
        return navigationMarkMapper.selectNavigationMarkList(navigationMark);
    }

    /**
     * 新增航标基础信息
     * 
     * @param navigationMark 航标基础信息
     * @return 结果
     */
    @Override
    public int insertNavigationMark(NavigationMark navigationMark)
    {
        navigationMark.setCreateTime(DateUtils.getNowDate());
        return navigationMarkMapper.insertNavigationMark(navigationMark);
    }

    /**
     * 修改航标基础信息
     * 
     * @param navigationMark 航标基础信息
     * @return 结果
     */
    @Override
    public int updateNavigationMark(NavigationMark navigationMark)
    {
        navigationMark.setUpdateTime(DateUtils.getNowDate());
        return navigationMarkMapper.updateNavigationMark(navigationMark);
    }

    /**
     * 批量删除航标基础信息
     * 
     * @param ids 需要删除的航标基础信息主键
     * @return 结果
     */
    @Override
    public int deleteNavigationMarkByIds(Long[] ids)
    {
        return navigationMarkMapper.deleteNavigationMarkByIds(ids);
    }

    /**
     * 删除航标基础信息信息
     * 
     * @param id 航标基础信息主键
     * @return 结果
     */
    @Override
    public int deleteNavigationMarkById(Long id)
    {
        return navigationMarkMapper.deleteNavigationMarkById(id);
    }

    @Override
    public List<Map> deptNavigationMarkList(String markName) {
        return navigationMarkMapper.deptNavigationMarkList(markName);
    }
}
